//
//  CheckBox.swift
//  casdon_swiftUI
//
//  Created by ww on 2025/4/5.
//

import SwiftUI

struct Checkbox: View {
    @Binding var isChecked: Bool
    var label: LocalizedStringKey

    var body: some View {
        Button(action: {
            isChecked.toggle()
        }) {
            HStack {
                Image(systemName: isChecked ? "checkmark.square.fill" : "square")
                    .resizable()
                    .frame(width: 16, height: 16)
                    .foregroundColor(isChecked ? AppColors.Brand6 : AppColors.Gy4)

                Text(label)
                    .foregroundColor(.gy3)
                    .font(.system(size: 14))
            }
        }
        .buttonStyle(PlainButtonStyle())
    }
}
